﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="AndrewSiemer.KnowledgeExchange.Domain"%>

<asp:Content ID="indexTitle" ContentPlaceHolderID="TitleContent" runat="server">
    Home Page
</asp:Content>

<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">
    <h1>Recent Questions</h1>
    
    <p>
        <%
            List<Post> posts = ViewData["Posts"] as List<Post>;

            foreach (Post post in posts)
            {
                %>
                <hr />
                <h2><%=post.Title %></h2>
                Created: <%=post.CreateDate %> Updated: <%= post.LastUpdated %>
                <%=post.Body %>
                <%
            }
         %>
    </p>
</asp:Content>
